#!/bin/bash

# 移动端开发启动脚本

echo "========================================="
echo "   老薛SSH工具 - H5移动端"
echo "========================================="
echo ""

# 检查Node.js
if ! command -v node &> /dev/null; then
    echo "❌ Node.js未安装"
    exit 1
fi

echo "✅ Node.js版本: $(node -v)"
echo ""

# 检查依赖
if [ ! -d "node_modules" ]; then
    echo "📦 安装依赖..."
    npm install --registry=https://registry.npmmirror.com
    echo ""
fi

# 启动开发服务器
echo "🚀 启动移动端开发服务器..."
echo "   访问: http://localhost:5174"
echo ""

npm run dev

